3.18 \(\int (a+b \sec ^{-1}(c x))^2 \, dx\)

Optimal. Leaf size=92 \[ x \left (a+b \sec ^{-1}(c x)\right )^2+\frac {4 i b \tan ^{-1}\left (e^{i \sec ^{-1}(c x)}\right ) \left (a+b \sec ^{-1}(c x)\right )}{c}-\frac {2 i b^2 \text {Li}_2\left (-i e^{i \sec ^{-1}(c x)}\right )}{c}+\frac {2 i b^2 \text {Li}_2\left (i e^{i \sec ^{-1}(c x)}\right )}{c} \]

[Out]

x*(a+b*arcsec(c*x))^2+4*I*b*(a+b*arcsec(c*x))*arctan(1/c/x+I*(1-1/c^2/x^2)^(1/2))/c-2*I*b^2*polylog(2,-I*(1/c/
x+I*(1-1/c^2/x^2)^(1/2)))/c+2*I*b^2*polylog(2,I*(1/c/x+I*(1-1/c^2/x^2)^(1/2)))/c

________________________________________________________________________________________

Rubi [A]  time = 0.07, antiderivative size = 92, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {5216, 4409, 4181, 2279, 2391} \[ -\frac {2 i b^2 \text {PolyLog}\left (2,-i e^{i \sec ^{-1}(c x)}\right )}{c}+\frac {2 i b^2 \text {PolyLog}\left (2,i e^{i \sec ^{-1}(c x)}\right )}{c}+x \left (a+b \sec ^{-1}(c x)\right )^2+\frac {4 i b \tan ^{-1}\left (e^{i \sec ^{-1}(c x)}\right ) \left (a+b \sec ^{-1}(c x)\right )}{c} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*ArcSec[c*x])^2,x]

[Out]

x*(a + b*ArcSec[c*x])^2 + ((4*I)*b*(a + b*ArcSec[c*x])*ArcTan[E^(I*ArcSec[c*x])])/c - ((2*I)*b^2*PolyLog[2, (-
I)*E^(I*ArcSec[c*x])])/c + ((2*I)*b^2*PolyLog[2, I*E^(I*ArcSec[c*x])])/c

Rule 2279

Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 4181

Int[csc[(e_.) + Pi*(k_.) + (f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(-2*(c + d*x)^m*ArcTanh[E
^(I*k*Pi)*E^(I*(e + f*x))])/f, x] + (-Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Log[1 - E^(I*k*Pi)*E^(I*(e + f*x))],
 x], x] + Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Log[1 + E^(I*k*Pi)*E^(I*(e + f*x))], x], x]) /; FreeQ[{c, d, e,
f}, x] && IntegerQ[2*k] && IGtQ[m, 0]

Rule 4409

Int[((c_.) + (d_.)*(x_))^(m_.)*Sec[(a_.) + (b_.)*(x_)]^(n_.)*Tan[(a_.) + (b_.)*(x_)]^(p_.), x_Symbol] :> Simp[
((c + d*x)^m*Sec[a + b*x]^n)/(b*n), x] - Dist[(d*m)/(b*n), Int[(c + d*x)^(m - 1)*Sec[a + b*x]^n, x], x] /; Fre
eQ[{a, b, c, d, n}, x] && EqQ[p, 1] && GtQ[m, 0]

Rule 5216

Int[((a_.) + ArcSec[(c_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Dist[1/c, Subst[Int[(a + b*x)^n*Sec[x]*Tan[x], x], x
, ArcSec[c*x]], x] /; FreeQ[{a, b, c, n}, x] && IGtQ[n, 0]

Rubi steps

\begin {align*} \int \left (a+b \sec ^{-1}(c x)\right )^2 \, dx &=\frac {\operatorname {Subst}\left (\int (a+b x)^2 \sec (x) \tan (x) \, dx,x,\sec ^{-1}(c x)\right )}{c}\\ &=x \left (a+b \sec ^{-1}(c x)\right )^2-\frac {(2 b) \operatorname {Subst}\left (\int (a+b x) \sec (x) \, dx,x,\sec ^{-1}(c x)\right )}{c}\\ &=x \left (a+b \sec ^{-1}(c x)\right )^2+\frac {4 i b \left (a+b \sec ^{-1}(c x)\right ) \tan ^{-1}\left (e^{i \sec ^{-1}(c x)}\right )}{c}+\frac {\left (2 b^2\right ) \operatorname {Subst}\left (\int \log \left (1-i e^{i x}\right ) \, dx,x,\sec ^{-1}(c x)\right )}{c}-\frac {\left (2 b^2\right ) \operatorname {Subst}\left (\int \log \left (1+i e^{i x}\right ) \, dx,x,\sec ^{-1}(c x)\right )}{c}\\ &=x \left (a+b \sec ^{-1}(c x)\right )^2+\frac {4 i b \left (a+b \sec ^{-1}(c x)\right ) \tan ^{-1}\left (e^{i \sec ^{-1}(c x)}\right )}{c}-\frac {\left (2 i b^2\right ) \operatorname {Subst}\left (\int \frac {\log (1-i x)}{x} \, dx,x,e^{i \sec ^{-1}(c x)}\right )}{c}+\frac {\left (2 i b^2\right ) \operatorname {Subst}\left (\int \frac {\log (1+i x)}{x} \, dx,x,e^{i \sec ^{-1}(c x)}\right )}{c}\\ &=x \left (a+b \sec ^{-1}(c x)\right )^2+\frac {4 i b \left (a+b \sec ^{-1}(c x)\right ) \tan ^{-1}\left (e^{i \sec ^{-1}(c x)}\right )}{c}-\frac {2 i b^2 \text {Li}_2\left (-i e^{i \sec ^{-1}(c x)}\right )}{c}+\frac {2 i b^2 \text {Li}_2\left (i e^{i \sec ^{-1}(c x)}\right )}{c}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.18, size = 163, normalized size = 1.77 \[ \frac {a^2 c x+2 a b \left (c x \sec ^{-1}(c x)+\log \left (\cos \left (\frac {1}{2} \sec ^{-1}(c x)\right )-\sin \left (\frac {1}{2} \sec ^{-1}(c x)\right )\right )-\log \left (\cos \left (\frac {1}{2} \sec ^{-1}(c x)\right )+\sin \left (\frac {1}{2} \sec ^{-1}(c x)\right )\right )\right )+b^2 \left (-2 i \text {Li}_2\left (-i e^{i \sec ^{-1}(c x)}\right )+2 i \text {Li}_2\left (i e^{i \sec ^{-1}(c x)}\right )+\sec ^{-1}(c x) \left (c x \sec ^{-1}(c x)-2 \log \left (1-i e^{i \sec ^{-1}(c x)}\right )+2 \log \left (1+i e^{i \sec ^{-1}(c x)}\right )\right )\right )}{c} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*ArcSec[c*x])^2,x]

[Out]

(a^2*c*x + 2*a*b*(c*x*ArcSec[c*x] + Log[Cos[ArcSec[c*x]/2] - Sin[ArcSec[c*x]/2]] - Log[Cos[ArcSec[c*x]/2] + Si
n[ArcSec[c*x]/2]]) + b^2*(ArcSec[c*x]*(c*x*ArcSec[c*x] - 2*Log[1 - I*E^(I*ArcSec[c*x])] + 2*Log[1 + I*E^(I*Arc
Sec[c*x])]) - (2*I)*PolyLog[2, (-I)*E^(I*ArcSec[c*x])] + (2*I)*PolyLog[2, I*E^(I*ArcSec[c*x])]))/c

________________________________________________________________________________________

fricas [F]  time = 1.02, size = 0, normalized size = 0.00 \[ {\rm integral}\left (b^{2} \operatorname {arcsec}\left (c x\right )^{2} + 2 \, a b \operatorname {arcsec}\left (c x\right ) + a^{2}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arcsec(c*x))^2,x, algorithm="fricas")

[Out]

integral(b^2*arcsec(c*x)^2 + 2*a*b*arcsec(c*x) + a^2, x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \operatorname {arcsec}\left (c x\right ) + a\right )}^{2}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arcsec(c*x))^2,x, algorithm="giac")

[Out]

integrate((b*arcsec(c*x) + a)^2, x)

________________________________________________________________________________________

maple [A]  time = 0.26, size = 212, normalized size = 2.30 \[ x \,b^{2} \mathrm {arcsec}\left (c x \right )^{2}+2 x a b \,\mathrm {arcsec}\left (c x \right )-\frac {2 b^{2} \mathrm {arcsec}\left (c x \right ) \ln \left (1-i \left (\frac {1}{c x}+i \sqrt {1-\frac {1}{c^{2} x^{2}}}\right )\right )}{c}+\frac {2 b^{2} \mathrm {arcsec}\left (c x \right ) \ln \left (1+i \left (\frac {1}{c x}+i \sqrt {1-\frac {1}{c^{2} x^{2}}}\right )\right )}{c}-\frac {2 i \dilog \left (1+i \left (\frac {1}{c x}+i \sqrt {1-\frac {1}{c^{2} x^{2}}}\right )\right ) b^{2}}{c}+\frac {2 i \dilog \left (1-i \left (\frac {1}{c x}+i \sqrt {1-\frac {1}{c^{2} x^{2}}}\right )\right ) b^{2}}{c}+a^{2} x -\frac {2 \ln \left (c x +c x \sqrt {1-\frac {1}{c^{2} x^{2}}}\right ) a b}{c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*arcsec(c*x))^2,x)

[Out]

x*b^2*arcsec(c*x)^2+2*x*a*b*arcsec(c*x)-2/c*b^2*arcsec(c*x)*ln(1-I*(1/c/x+I*(1-1/c^2/x^2)^(1/2)))+2/c*b^2*arcs
ec(c*x)*ln(1+I*(1/c/x+I*(1-1/c^2/x^2)^(1/2)))-2*I/c*dilog(1+I*(1/c/x+I*(1-1/c^2/x^2)^(1/2)))*b^2+2*I/c*dilog(1
-I*(1/c/x+I*(1-1/c^2/x^2)^(1/2)))*b^2+a^2*x-2/c*ln(c*x+c*x*(1-1/c^2/x^2)^(1/2))*a*b

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ -\frac {1}{4} \, {\left (2 \, c^{2} {\left (\frac {2 \, x}{c^{2}} - \frac {\log \left (c x + 1\right )}{c^{3}} + \frac {\log \left (c x - 1\right )}{c^{3}}\right )} \log \relax (c)^{2} - 4 \, c^{2} \int \frac {x^{2} \log \left (c^{2} x^{2}\right )}{c^{2} x^{2} - 1}\,{d x} \log \relax (c) + 8 \, c^{2} \int \frac {x^{2} \log \relax (x)}{c^{2} x^{2} - 1}\,{d x} \log \relax (c) - 4 \, x \arctan \left (\sqrt {c x + 1} \sqrt {c x - 1}\right )^{2} - 4 \, c^{2} \int \frac {x^{2} \log \left (c^{2} x^{2}\right ) \log \relax (x)}{c^{2} x^{2} - 1}\,{d x} + 4 \, c^{2} \int \frac {x^{2} \log \relax (x)^{2}}{c^{2} x^{2} - 1}\,{d x} - 4 \, c^{2} \int \frac {x^{2} \log \left (c^{2} x^{2}\right )}{c^{2} x^{2} - 1}\,{d x} + x \log \left (c^{2} x^{2}\right )^{2} + 2 \, {\left (\frac {\log \left (c x + 1\right )}{c} - \frac {\log \left (c x - 1\right )}{c}\right )} \log \relax (c)^{2} + 4 \, \int \frac {\log \left (c^{2} x^{2}\right )}{c^{2} x^{2} - 1}\,{d x} \log \relax (c) - 8 \, \int \frac {\log \relax (x)}{c^{2} x^{2} - 1}\,{d x} \log \relax (c) + 8 \, \int \frac {\sqrt {c x + 1} \sqrt {c x - 1} \arctan \left (\sqrt {c x + 1} \sqrt {c x - 1}\right )}{c^{2} x^{2} - 1}\,{d x} + 4 \, \int \frac {\log \left (c^{2} x^{2}\right ) \log \relax (x)}{c^{2} x^{2} - 1}\,{d x} - 4 \, \int \frac {\log \relax (x)^{2}}{c^{2} x^{2} - 1}\,{d x} + 4 \, \int \frac {\log \left (c^{2} x^{2}\right )}{c^{2} x^{2} - 1}\,{d x}\right )} b^{2} + a^{2} x + \frac {{\left (2 \, c x \operatorname {arcsec}\left (c x\right ) - \log \left (\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right ) + \log \left (-\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right )\right )} a b}{c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arcsec(c*x))^2,x, algorithm="maxima")

[Out]

-1/4*(2*c^2*(2*x/c^2 - log(c*x + 1)/c^3 + log(c*x - 1)/c^3)*log(c)^2 - 4*c^2*integrate(x^2*log(c^2*x^2)/(c^2*x
^2 - 1), x)*log(c) + 8*c^2*integrate(x^2*log(x)/(c^2*x^2 - 1), x)*log(c) - 4*x*arctan(sqrt(c*x + 1)*sqrt(c*x -
 1))^2 - 4*c^2*integrate(x^2*log(c^2*x^2)*log(x)/(c^2*x^2 - 1), x) + 4*c^2*integrate(x^2*log(x)^2/(c^2*x^2 - 1
), x) - 4*c^2*integrate(x^2*log(c^2*x^2)/(c^2*x^2 - 1), x) + x*log(c^2*x^2)^2 + 2*(log(c*x + 1)/c - log(c*x -
1)/c)*log(c)^2 + 4*integrate(log(c^2*x^2)/(c^2*x^2 - 1), x)*log(c) - 8*integrate(log(x)/(c^2*x^2 - 1), x)*log(
c) + 8*integrate(sqrt(c*x + 1)*sqrt(c*x - 1)*arctan(sqrt(c*x + 1)*sqrt(c*x - 1))/(c^2*x^2 - 1), x) + 4*integra
te(log(c^2*x^2)*log(x)/(c^2*x^2 - 1), x) - 4*integrate(log(x)^2/(c^2*x^2 - 1), x) + 4*integrate(log(c^2*x^2)/(
c^2*x^2 - 1), x))*b^2 + a^2*x + (2*c*x*arcsec(c*x) - log(sqrt(-1/(c^2*x^2) + 1) + 1) + log(-sqrt(-1/(c^2*x^2)
+ 1) + 1))*a*b/c

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int {\left (a+b\,\mathrm {acos}\left (\frac {1}{c\,x}\right )\right )}^2 \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*acos(1/(c*x)))^2,x)

[Out]

int((a + b*acos(1/(c*x)))^2, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \operatorname {asec}{\left (c x \right )}\right )^{2}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*asec(c*x))**2,x)

[Out]

Integral((a + b*asec(c*x))**2, x)

________________________________________________________________________________________